package com.naiterui.ehp.bs.weixin.subscribe;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 收货提醒通知
 *
 * @author yangfuya
 * @version 1.0
 * @date 2021/5/26 17:40
 **/
@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@AllArgsConstructor
public class ReceiptReminderSubscribe extends BaseSubscribe {

    private static final long serialVersionUID = -1827296603776003252L;

    /**
     * 订单编号
     */
    private String orderNumber;

    /**
     * 商品名称
     */
    private String productName;

    /**
     * 确认收货时间
     */
    private String confirmReceiptTime;

    /**
     * 温馨提示
     */
    private String tips;

    @Override
    public String getTemplateLabel() {
        return "RECEIPT_REMINDER";
    }

    @Override
    public void handleContent(List<SubscribeProperties.Content> contentList) {
        Map<String, String> formatMap = new HashMap<>(6);
        formatMap.put("ORDER_NUMBER", getOrderNumber());
        formatMap.put("PRODUCT_NAME", getProductName());
        formatMap.put("CONFIRM_RECEIPT_TIME", getConfirmReceiptTime());
        formatMap.put("TIPS", getTips());
        super.formatData(contentList, formatMap);
    }
}
